3.54 \(\int \frac {c+d x}{a+b \coth (e+f x)} \, dx\)

Optimal. Leaf size=108 \[ -\frac {b (c+d x) \log \left (1-\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{f \left (a^2-b^2\right )}+\frac {b d \text {Li}_2\left (\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{2 f^2 \left (a^2-b^2\right )}+\frac {(c+d x)^2}{2 d (a+b)} \]

[Out]

1/2*(d*x+c)^2/(a+b)/d-b*(d*x+c)*ln(1+(-a+b)/(a+b)/exp(2*f*x+2*e))/(a^2-b^2)/f+1/2*b*d*polylog(2,(a-b)/(a+b)/ex
p(2*f*x+2*e))/(a^2-b^2)/f^2

________________________________________________________________________________________

Rubi [A]  time = 0.16, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3731, 2190, 2279, 2391} \[ \frac {b d \text {PolyLog}\left (2,\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{2 f^2 \left (a^2-b^2\right )}-\frac {b (c+d x) \log \left (1-\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{f \left (a^2-b^2\right )}+\frac {(c+d x)^2}{2 d (a+b)} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)/(a + b*Coth[e + f*x]),x]

[Out]

(c + d*x)^2/(2*(a + b)*d) - (b*(c + d*x)*Log[1 - (a - b)/((a + b)*E^(2*(e + f*x)))])/((a^2 - b^2)*f) + (b*d*Po
lyLog[2, (a - b)/((a + b)*E^(2*(e + f*x)))])/(2*(a^2 - b^2)*f^2)

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
 - Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 3731

Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*tan[(e_.) + Pi*(k_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c + d*x)^
(m + 1)/(d*(m + 1)*(a + I*b)), x] + Dist[2*I*b, Int[((c + d*x)^m*E^(2*I*k*Pi)*E^Simp[2*I*(e + f*x), x])/((a +
I*b)^2 + (a^2 + b^2)*E^(2*I*k*Pi)*E^Simp[2*I*(e + f*x), x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && Integer
Q[4*k] && NeQ[a^2 + b^2, 0] && IGtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {c+d x}{a+b \coth (e+f x)} \, dx &=\frac {(c+d x)^2}{2 (a+b) d}-(2 b) \int \frac {e^{-2 (e+f x)} (c+d x)}{(a+b)^2+\left (-a^2+b^2\right ) e^{-2 (e+f x)}} \, dx\\ &=\frac {(c+d x)^2}{2 (a+b) d}-\frac {b (c+d x) \log \left (1-\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right ) f}+\frac {(b d) \int \log \left (1+\frac {\left (-a^2+b^2\right ) e^{-2 (e+f x)}}{(a+b)^2}\right ) \, dx}{\left (a^2-b^2\right ) f}\\ &=\frac {(c+d x)^2}{2 (a+b) d}-\frac {b (c+d x) \log \left (1-\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right ) f}-\frac {(b d) \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {\left (-a^2+b^2\right ) x}{(a+b)^2}\right )}{x} \, dx,x,e^{-2 (e+f x)}\right )}{2 \left (a^2-b^2\right ) f^2}\\ &=\frac {(c+d x)^2}{2 (a+b) d}-\frac {b (c+d x) \log \left (1-\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right ) f}+\frac {b d \text {Li}_2\left (\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{2 \left (a^2-b^2\right ) f^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 3.18, size = 144, normalized size = 1.33 \[ \frac {b \left (-\frac {2 (c+d x) \log \left (\frac {(b-a) e^{-2 (e+f x)}}{a+b}+1\right )}{f (a-b)}+\frac {2 (c+d x)^2}{d \left (a \left (e^{2 e}-1\right )+b \left (e^{2 e}+1\right )\right )}+\frac {d \text {Li}_2\left (\frac {(a-b) e^{-2 (e+f x)}}{a+b}\right )}{f^2 (a-b)}\right )}{2 (a+b)}+\frac {x \sinh (e) (2 c+d x)}{2 (a \sinh (e)+b \cosh (e))} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)/(a + b*Coth[e + f*x]),x]

[Out]

(b*((2*(c + d*x)^2)/(d*(a*(-1 + E^(2*e)) + b*(1 + E^(2*e)))) - (2*(c + d*x)*Log[1 + (-a + b)/((a + b)*E^(2*(e
+ f*x)))])/((a - b)*f) + (d*PolyLog[2, (a - b)/((a + b)*E^(2*(e + f*x)))])/((a - b)*f^2)))/(2*(a + b)) + (x*(2
*c + d*x)*Sinh[e])/(2*(b*Cosh[e] + a*Sinh[e]))

________________________________________________________________________________________

fricas [B]  time = 0.46, size = 300, normalized size = 2.78 \[ \frac {{\left (a + b\right )} d f^{2} x^{2} + 2 \, {\left (a + b\right )} c f^{2} x - 2 \, b d {\rm Li}_2\left (\sqrt {\frac {a + b}{a - b}} {\left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right )\right )}\right ) - 2 \, b d {\rm Li}_2\left (-\sqrt {\frac {a + b}{a - b}} {\left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right )\right )}\right ) + 2 \, {\left (b d e - b c f\right )} \log \left (2 \, {\left (a + b\right )} \cosh \left (f x + e\right ) + 2 \, {\left (a + b\right )} \sinh \left (f x + e\right ) + 2 \, {\left (a - b\right )} \sqrt {\frac {a + b}{a - b}}\right ) + 2 \, {\left (b d e - b c f\right )} \log \left (2 \, {\left (a + b\right )} \cosh \left (f x + e\right ) + 2 \, {\left (a + b\right )} \sinh \left (f x + e\right ) - 2 \, {\left (a - b\right )} \sqrt {\frac {a + b}{a - b}}\right ) - 2 \, {\left (b d f x + b d e\right )} \log \left (\sqrt {\frac {a + b}{a - b}} {\left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right )\right )} + 1\right ) - 2 \, {\left (b d f x + b d e\right )} \log \left (-\sqrt {\frac {a + b}{a - b}} {\left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right )\right )} + 1\right )}{2 \, {\left (a^{2} - b^{2}\right )} f^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+b*coth(f*x+e)),x, algorithm="fricas")

[Out]

1/2*((a + b)*d*f^2*x^2 + 2*(a + b)*c*f^2*x - 2*b*d*dilog(sqrt((a + b)/(a - b))*(cosh(f*x + e) + sinh(f*x + e))
) - 2*b*d*dilog(-sqrt((a + b)/(a - b))*(cosh(f*x + e) + sinh(f*x + e))) + 2*(b*d*e - b*c*f)*log(2*(a + b)*cosh
(f*x + e) + 2*(a + b)*sinh(f*x + e) + 2*(a - b)*sqrt((a + b)/(a - b))) + 2*(b*d*e - b*c*f)*log(2*(a + b)*cosh(
f*x + e) + 2*(a + b)*sinh(f*x + e) - 2*(a - b)*sqrt((a + b)/(a - b))) - 2*(b*d*f*x + b*d*e)*log(sqrt((a + b)/(
a - b))*(cosh(f*x + e) + sinh(f*x + e)) + 1) - 2*(b*d*f*x + b*d*e)*log(-sqrt((a + b)/(a - b))*(cosh(f*x + e) +
 sinh(f*x + e)) + 1))/((a^2 - b^2)*f^2)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {d x + c}{b \coth \left (f x + e\right ) + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+b*coth(f*x+e)),x, algorithm="giac")

[Out]

integrate((d*x + c)/(b*coth(f*x + e) + a), x)

________________________________________________________________________________________

maple [B]  time = 0.75, size = 357, normalized size = 3.31 \[ \frac {d \,x^{2}}{2 b +2 a}+\frac {c x}{a +b}+\frac {2 b c \ln \left ({\mathrm e}^{f x +e}\right )}{f \left (a +b \right ) \left (a -b \right )}-\frac {b c \ln \left (a \,{\mathrm e}^{2 f x +2 e}+b \,{\mathrm e}^{2 f x +2 e}-a +b \right )}{f \left (a +b \right ) \left (a -b \right )}-\frac {b d \ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 f x +2 e}}{a -b}\right ) x}{f \left (a +b \right ) \left (a -b \right )}-\frac {b d \ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 f x +2 e}}{a -b}\right ) e}{f^{2} \left (a +b \right ) \left (a -b \right )}+\frac {b d \,x^{2}}{\left (a +b \right ) \left (a -b \right )}+\frac {2 b d e x}{f \left (a +b \right ) \left (a -b \right )}+\frac {b d \,e^{2}}{f^{2} \left (a +b \right ) \left (a -b \right )}-\frac {b d \polylog \left (2, \frac {\left (a +b \right ) {\mathrm e}^{2 f x +2 e}}{a -b}\right )}{2 f^{2} \left (a +b \right ) \left (a -b \right )}-\frac {2 b d e \ln \left ({\mathrm e}^{f x +e}\right )}{f^{2} \left (a +b \right ) \left (a -b \right )}+\frac {b d e \ln \left (a \,{\mathrm e}^{2 f x +2 e}+b \,{\mathrm e}^{2 f x +2 e}-a +b \right )}{f^{2} \left (a +b \right ) \left (a -b \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)/(a+b*coth(f*x+e)),x)

[Out]

1/2/(a+b)*d*x^2+1/(a+b)*c*x+2/f*b/(a+b)*c/(a-b)*ln(exp(f*x+e))-1/f*b/(a+b)*c/(a-b)*ln(a*exp(2*f*x+2*e)+b*exp(2
*f*x+2*e)-a+b)-1/f*b/(a+b)*d/(a-b)*ln(1-(a+b)*exp(2*f*x+2*e)/(a-b))*x-1/f^2*b/(a+b)*d/(a-b)*ln(1-(a+b)*exp(2*f
*x+2*e)/(a-b))*e+b/(a+b)/(a-b)*d*x^2+2/f*b/(a+b)/(a-b)*d*e*x+1/f^2*b/(a+b)/(a-b)*d*e^2-1/2/f^2*b/(a+b)*d/(a-b)
*polylog(2,(a+b)*exp(2*f*x+2*e)/(a-b))-2/f^2*b/(a+b)*d*e/(a-b)*ln(exp(f*x+e))+1/f^2*b/(a+b)*d*e/(a-b)*ln(a*exp
(2*f*x+2*e)+b*exp(2*f*x+2*e)-a+b)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {1}{2} \, {\left (4 \, b \int -\frac {x}{a^{2} - b^{2} - {\left (a^{2} e^{\left (2 \, e\right )} + 2 \, a b e^{\left (2 \, e\right )} + b^{2} e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )}}\,{d x} - \frac {x^{2}}{a + b}\right )} d - c {\left (\frac {b \log \left (-{\left (a - b\right )} e^{\left (-2 \, f x - 2 \, e\right )} + a + b\right )}{{\left (a^{2} - b^{2}\right )} f} - \frac {f x + e}{{\left (a + b\right )} f}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+b*coth(f*x+e)),x, algorithm="maxima")

[Out]

-1/2*(4*b*integrate(-x/(a^2 - b^2 - (a^2*e^(2*e) + 2*a*b*e^(2*e) + b^2*e^(2*e))*e^(2*f*x)), x) - x^2/(a + b))*
d - c*(b*log(-(a - b)*e^(-2*f*x - 2*e) + a + b)/((a^2 - b^2)*f) - (f*x + e)/((a + b)*f))

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {c+d\,x}{a+b\,\mathrm {coth}\left (e+f\,x\right )} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x)/(a + b*coth(e + f*x)),x)

[Out]

int((c + d*x)/(a + b*coth(e + f*x)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {c + d x}{a + b \coth {\left (e + f x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+b*coth(f*x+e)),x)

[Out]

Integral((c + d*x)/(a + b*coth(e + f*x)), x)

________________________________________________________________________________________